/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * FRMesas.java
 *
 * Created on Nov 1, 2011, 8:25:25 PM
 */

package Interfaz;

import Negocio.UI.UIPuntoVenta;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 *
 * @author Marco
 */
public class FRMesas extends javax.swing.JFrame {

    /** Creates new form FRMesas */
    private UIPuntoVenta uiPuntoVenta = UIPuntoVenta.getInstancia();

    public FRMesas() {
        initComponents();
        setSize(800, 600);
        setLocationRelativeTo(this);
    }

    public JButton getBtnMenuPrincipal() {
        return btnMenuPrincipal;
    }

    public void setBtnMenuPrincipal(JButton btnMenuPrincipal) {
        this.btnMenuPrincipal = btnMenuPrincipal;
    }

    public JLabel getLblMesas() {
        return lblMesas;
    }

    public void setLblMesas(JLabel lblMesas) {
        this.lblMesas = lblMesas;
    }

    public JPanel getPnlFondo() {
        return pnlFondo;
    }

    public void setPnlFondo(JPanel pnlFondo) {
        this.pnlFondo = pnlFondo;
    }

    public JPanel getPnlHeader() {
        return pnlHeader;
    }

    public void setPnlHeader(JPanel pnlHeader) {
        this.pnlHeader = pnlHeader;
    }

    public JPanel getPnlMesas() {
        return pnlMesas;
    }

    public void setPnlMesas(JPanel pnlMesas) {
        this.pnlMesas = pnlMesas;
    }

    public UIPuntoVenta getUiPuntoVenta() {
        return uiPuntoVenta;
    }

    public void setUiPuntoVenta(UIPuntoVenta uiPuntoVenta) {
        this.uiPuntoVenta = uiPuntoVenta;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jButton7 = new javax.swing.JButton();
        pnlFondo = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        pnlMesas = new javax.swing.JPanel();
        pnlHeader = new javax.swing.JPanel();
        btnMenuPrincipal = new javax.swing.JButton();
        lblMesas = new javax.swing.JLabel();
        btnAgregarMesa = new javax.swing.JButton();
        btnAgregarMesa1 = new javax.swing.JButton();

        jButton7.setText("jButton1");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        pnlFondo.setBackground(new java.awt.Color(255, 255, 255));
        pnlFondo.setForeground(new java.awt.Color(51, 0, 51));

        pnlMesas.setBackground(new java.awt.Color(255, 255, 255));

        javax.swing.GroupLayout pnlMesasLayout = new javax.swing.GroupLayout(pnlMesas);
        pnlMesas.setLayout(pnlMesasLayout);
        pnlMesasLayout.setHorizontalGroup(
            pnlMesasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 799, Short.MAX_VALUE)
        );
        pnlMesasLayout.setVerticalGroup(
            pnlMesasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 556, Short.MAX_VALUE)
        );

        jScrollPane1.setViewportView(pnlMesas);

        javax.swing.GroupLayout pnlFondoLayout = new javax.swing.GroupLayout(pnlFondo);
        pnlFondo.setLayout(pnlFondoLayout);
        pnlFondoLayout.setHorizontalGroup(
            pnlFondoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlFondoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 780, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlFondoLayout.setVerticalGroup(
            pnlFondoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlFondoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 479, Short.MAX_VALUE)
                .addContainerGap())
        );

        pnlHeader.setBackground(new java.awt.Color(51, 51, 51));

        btnMenuPrincipal.setBackground(new java.awt.Color(255, 255, 255));
        btnMenuPrincipal.setFont(new java.awt.Font("MS Reference Sans Serif", 0, 18));
        btnMenuPrincipal.setText("Menú Principal");
        btnMenuPrincipal.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        btnMenuPrincipal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuPrincipalActionPerformed(evt);
            }
        });

        lblMesas.setFont(new java.awt.Font("Microsoft JhengHei", 1, 18)); // NOI18N
        lblMesas.setForeground(new java.awt.Color(255, 255, 255));
        lblMesas.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblMesas.setText("Mesas");

        btnAgregarMesa.setBackground(new java.awt.Color(255, 255, 255));
        btnAgregarMesa.setFont(new java.awt.Font("MS Reference Sans Serif", 0, 48)); // NOI18N
        btnAgregarMesa.setForeground(new java.awt.Color(0, 153, 51));
        btnAgregarMesa.setText("+");
        btnAgregarMesa.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        btnAgregarMesa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarMesaActionPerformed(evt);
            }
        });

        btnAgregarMesa1.setBackground(new java.awt.Color(255, 255, 255));
        btnAgregarMesa1.setFont(new java.awt.Font("MS Reference Sans Serif", 0, 54)); // NOI18N
        btnAgregarMesa1.setForeground(new java.awt.Color(204, 0, 0));
        btnAgregarMesa1.setText("-");
        btnAgregarMesa1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        btnAgregarMesa1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarMesa1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlHeaderLayout = new javax.swing.GroupLayout(pnlHeader);
        pnlHeader.setLayout(pnlHeaderLayout);
        pnlHeaderLayout.setHorizontalGroup(
            pnlHeaderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeaderLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnMenuPrincipal, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(76, 76, 76)
                .addComponent(lblMesas, javax.swing.GroupLayout.PREFERRED_SIZE, 296, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 71, Short.MAX_VALUE)
                .addComponent(btnAgregarMesa1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnAgregarMesa, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(32, 32, 32))
        );
        pnlHeaderLayout.setVerticalGroup(
            pnlHeaderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeaderLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlHeaderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlHeaderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(btnMenuPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, 75, Short.MAX_VALUE)
                        .addComponent(lblMesas, javax.swing.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE))
                    .addGroup(pnlHeaderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(btnAgregarMesa1, 0, 0, Short.MAX_VALUE)
                        .addComponent(btnAgregarMesa, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlHeader, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(pnlFondo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(pnlHeader, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(pnlFondo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnAgregarMesaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarMesaActionPerformed
        uiPuntoVenta.agregarMesa();
    }//GEN-LAST:event_btnAgregarMesaActionPerformed

    private void btnMenuPrincipalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuPrincipalActionPerformed
        uiPuntoVenta.framePrincipalMesas();
    }//GEN-LAST:event_btnMenuPrincipalActionPerformed

    private void btnAgregarMesa1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarMesa1ActionPerformed
        uiPuntoVenta.eliminarMesa();        // TODO add your handling code here:
    }//GEN-LAST:event_btnAgregarMesa1ActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FRMesas().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAgregarMesa;
    private javax.swing.JButton btnAgregarMesa1;
    private javax.swing.JButton btnMenuPrincipal;
    private javax.swing.JButton jButton7;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblMesas;
    private javax.swing.JPanel pnlFondo;
    private javax.swing.JPanel pnlHeader;
    private javax.swing.JPanel pnlMesas;
    // End of variables declaration//GEN-END:variables


}
